package com.example;

/**
 * Created by ZhangChao on 2017/2/18.
 */

public class LeakManager {

    private  Leak leak;

    public void register(Leak leak){
        this.leak=leak;
    }

    public void unregister(){
        this.leak=null;
    }

    public void show(){
        int i=0;
        while(i<100){
//            System.out.println("leak="+i);
            leak.show("leak="+i);
            i++;
        }
    }
}
